import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
import regAll from './directives'
import _ from 'lodash'
// 引入坤样式
import '@/assets/css/iconfont.css'
import '@/assets/css/kun.css'
// 导入所有的公共组件
import Components from '@/components'
regAll()
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
// set ElementUI lang to EN
Vue.prototype._ = _
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)
// 将所有的公共组件注册到全局，在Vue.use的时候实际调用的是传入的这个参数的install函数,而install函数中的形参Vue则是当前Vue实例
// 在执行了install函数之后，所有的公共组件便注册到了全局当中
Vue.use(Components)
Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
})
